package com.andy.controller;

import com.andy.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/user")
public class LoginController {

    @Autowired
    private LoginService loginService;

    @RequestMapping("/xxx")
    public String xxx(){
        return "login";
    }


    @RequestMapping("/login")
    @ResponseBody
    public String login(String username, String password) throws Exception{
        loginService.login(username,password);

        return "resume";
    }




}
